<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./vue.js"></script>
  </head>
  <body>
    <div id="app">
      <p>{{obj[0].a[3].name | xx }}</p>
      <p>{{ yy(obj[0].a[3].name ) }}</p>
    </div>
    <script>
      new Vue({
        el: "#app",
        data: {
          obj: [
            {
              a: [
                1,
                2,
                3,
                {
                  name: "nick",
                },
              ],
            },
          ],
        },
        methods: {
          yy: function (value) {
            return value.slice(0, 1).toUpperCase() + value.slice(1);
          },
        },

        filters: {
          xx: function (value) {
            return value.slice(0, 1).toUpperCase() + value.slice(1);
          },
        },
      });
    </script>
  </body>
</html>
